<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>江西省财审管理系统</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/Top.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/index2.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/buttons.css" />
    <%--    <script type="text/javascript" src="${pageContext.request.contextPath}/js/crypto-js.js"></script>--%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/datagrid-detailview.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/util/jquery.cookie.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/YMLib.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/init.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/index.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/crypto-js.min.js"></script>
    <script type="text/javascript">
        // window.addEventListener('message', (e) => {
        //     console.log('111111111111');
        //     console.log(e.data);
        // }, false);

        function encrypt(word) {
            var keyStr = "ABCDEF1234567890"; // 密钥
            var ivStr = "1234567890ABCDEF"; // 偏移量
            var key = CryptoJS.enc.Utf8.parse(keyStr);
            var iv = CryptoJS.enc.Utf8.parse(ivStr);
            var srcs = CryptoJS.enc.Utf8.parse(word);
            var encrypted = CryptoJS.AES.encrypt(srcs, key, {
                iv:iv,
                mode: CryptoJS.mode.CBC,
                padding: CryptoJS.pad.Pkcs7
            });
            return encrypted.toString();
        }

        $(function () {
            var truename = encrypt($.cookie("truename"));
            console.log('truename = ' + truename);
           window.location.href = "http://36.2.11.102:5509/#/?sysId=2&truename="+truename;
        });
    </script>
</head>
<body>

</body>
</html>
